package com.fqgj.sentry.controller.pc;

import com.fqgj.sentry.biz.pc.EventBusiness;
import com.fqgj.sentry.biz.pc.vo.event.EventVo;
import com.fqgj.sentry.common.cache.RequestLocalInfo;
import com.fqgj.sentry.common.response.ApiOutput;
import com.fqgj.sentry.common.utils.ApiPage;
import com.fqgj.sentry.controller.pc.request.AddEventVo;
import com.fqgj.sentry.controller.pc.request.EventPageVo;
import com.fqgj.sentry.controller.pc.request.UpdateEventVo;
import com.fqgj.sentry.controller.pc.response.DataModuleListResponse;
import com.fqgj.sentry.policy.dao.RiskDataModulesDao;
import com.fqgj.sentry.policy.entity.RiskDataModulesEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * Created by zwh @yuntu-inc.com
 *
 * @description
 * @create 2017/7/26 0026 下午 8:30
 */
@RestController
@RequestMapping(value = "/module")
public class DataModuleController {
    @Autowired
    private EventBusiness eventBusiness;

    @Autowired
    private RiskDataModulesDao riskDataModulesDao;

    /**
     * 查询事件列表
     */
    @RequestMapping(value = "/list", method = RequestMethod.POST)
    public ApiOutput comboEvent() {
        List<RiskDataModulesEntity> allActiveList = riskDataModulesDao.getAllActiveList();
        return new ApiOutput<>("list", new DataModuleListResponse(allActiveList).getList());
    }


}
